mask Property |
String that specifies the mask that allows to define an expected format for a given field.
Syntax
HTML |
<ELEMENT id=elementID fieldType=sType mask=sMask...>...</ELEMENT> |
Scripting |
elementID.mask [ =sMask ] |
Parameters
Parameter |
Description |
---|---|
sMask |
String that denotes the mask that can be set for a field, which can follow a certain format. Following are the rules that defines the mask.
|
Remarks
The mask expressions used here are completely case-insensitive.
If the expression is other than what is specified above, it is considered a literal and will be expected in the user's input exactly as it appears in the mask.
Example
The following example shows how themaskproperty can be used.
//validate definition inside the BODY <div cordysType="wcp.library.util.Validate" id="validate" ></div> //INPUT box with mask set such that the length of the text is 3, and the first value //and the first value should be a letter and the other two should be digits <input type="text" fieldType="text" mask="a99"> //INPUT box with mask that requires a dollar amount up to 999.99 with leading zeros suppressed <input type="text" fieldType="amount" mask="$ZZ9.99"> //INPUT box with mask that is of length 2 or 3, and that is only digits <input type="text" fieldType="text" mask="99z">